﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Brain
{
    public static class StringUtil
    {

        public static string Invert(string str)
        {
            string final = "";

            for (int i = str.Length -1; i >= 0; i--)
            {
                final += str[i];
            }

            return final;
        }

        public static string RemoveSpaces(string str)
        {
            string final = "";

            for (int i = 0; i < str.Length; i++)
            {
                char c = str[i];
                if (c != ' ')
                {
                    final += c;
                }
            }

            return final;
        }
    }
}
